<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class AddNewColumnToMapTownshipPlanAreaTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('map_township_plan_area', function (Blueprint $table) {
            $table->unsignedInteger('residentMember')->default(0)->after('qianqiangTownRank')->comment('居民委员个数');
            $table->unsignedInteger('villagersMember')->default(0)->after('qianqiangTownRank')->comment('村民委员个数');
            $table->unsignedInteger('bigEnterprisesIndustrial')->default(0)->after('qianqiangTownRank')->comment('规模工业企业单位数');
            $table->unsignedInteger('enterprisesIndustrial')->default(0)->after('qianqiangTownRank')->comment('工业企业单位数');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('map_township_plan_area', function (Blueprint $table) {
            $table->dropColumn('residentMember');
            $table->dropColumn('villagersMember');
            $table->dropColumn('bigEnterprisesIndustrial');
            $table->dropColumn('enterprisesIndustrial');
        });
    }
}
